//
//  CHWXJLCell.m
//  CarFile
//
//  Created by 陈浩 on 2017/4/11.
//  Copyright © 2017年 陈浩. All rights reserved.
//

#import "CHWXJLCell.h"
@interface CHWXJLCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UILabel *companyLabel;

@property (weak, nonatomic) IBOutlet UILabel *dateLabel;

@end
@implementation CHWXJLCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.titleLabel.textColor = [UIColor colorWithHexString:@"148ec7" alpha:1.0f];
    self.companyLabel.textColor = [UIColor colorWithHexString:@"888888" alpha:1.0f];
    self.dateLabel.textColor = [UIColor colorWithHexString:@"888888" alpha:1.0f];;
    
    
    
}


+(instancetype)cellForTableView:(UITableView *)tableView{
    static NSString *ID = @"repairCell";
    CHWXJLCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"CHWXJLCell" owner:nil options:nil] lastObject];
    }
    return cell;
}


-(void)setModel:(JL_Model *)model{
    _model = model;

    NSArray *arr = [NSArray array];
    arr = [model.settledate componentsSeparatedByString:@" "];
    if (model.carno.length > 0) {
       self.titleLabel.text = [NSString stringWithFormat:@"%@ (VIN:%@)",model.carno,model.carvin];
    }else{
       self.titleLabel.text = [NSString stringWithFormat:@"%@ (VIN:%@)",model.vehicleplatenumber,model.vin];
    }

    self.companyLabel.text =[NSString stringWithFormat:@"维修企业:%@",model.company];
    self.dateLabel.text = [NSString stringWithFormat:@"结算日期:%@",arr[0]];
    
    
    
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
